import TridentNavBar from '@/components/library/TridentNavBar.vue'
import TridentCustomNav from '@/components/library/TridentCustomNav.vue'
import TridentBackTop from '@/components/library/TridentBackTop.vue'
import TridentContactItem from '@/components/library/TridentContactItem.vue'
import TridentCellItem from '@/components/library/TridentCellItem.vue'
import TridentScanner from '@/components/library/TridentScanner.vue'
import TridentGroupChatItem from '@/components/library/TridentGroupChatItem.vue'
import TridentEmoji from '@/components/library/TridentEmoji.vue'
import TridentMap from '@/components/library/TridentMap.vue'
import TridentEmpty from '@/components/library/TridentEmpty.vue'
import TridentCellSkeleton from '@/components/library/TridentCellSkeleton.vue'
import TridentFriendSkeleton from '@/components/library/TridentFriendSkeleton.vue'

// vue3.0插件写法要素：导出一个对象，有install函数，默认传入了app应用实例，app基础之上扩展
export const componentLibraryPlugin = {
    install (app: any) {
      // 在app上进行扩展，app提供 component directive 函数
      // 如果要挂载原型 app.config.globalProperties 方式
      // 挂载顶部导航组件
      app.component('TridentNavBar', TridentNavBar)

      // 挂载自定义顶部导航组件
      app.component('TridentCustomNav', TridentCustomNav)

      // 挂载返回顶部组件
      app.component('TridentBackTop', TridentBackTop)

      // 挂载联系人组件
      app.component('TridentContactItem', TridentContactItem)

      // 挂载单元格明细组件
      app.component('TridentCellItem', TridentCellItem)

      // 挂载扫一扫组件
      app.component('TridentScanner', TridentScanner)

      // 挂载群聊明细组件
      app.component('TridentGroupChatItem', TridentGroupChatItem)

      // 挂载表情组件
      app.component('TridentEmoji', TridentEmoji)

      // 挂载地图组件
      app.component('TridentMap', TridentMap)

      // 挂载空数据组件
      app.component('TridentEmpty', TridentEmpty)

      // 挂载单元格骨架屏组件
      app.component('TridentCellSkeleton', TridentCellSkeleton)

      // 挂载好友骨架屏组件
      app.component('TridentFriendSkeleton', TridentFriendSkeleton)
    }
}